<?xml version="1.0"?>
<component name="org.nuxeo.ecm.relations.web.layouts.contrib.override">

  <require>org.nuxeo.ecm.relations.web.layouts.contrib</require>

  <extension point="widgets" target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager">

    <widget name="relation_search_title" type="text">
      <labels>
        <label mode="any">label.relation.search.title</label>
      </labels>
      <translated>true</translated>
      <helpLabels>
        <label mode="any">label.relation.search.title.info</label>
      </helpLabels>
      <fields>
        <field>rel_srch:dc_title</field>
      </fields>
      <properties widgetMode="edit">
        <property name="styleClass">dataInputText</property>
      </properties>
    </widget>

    <widget name="relation_search_fulltext" type="text">
      <labels>
        <label mode="any">label.relation.search.all_words</label>
      </labels>
      <translated>true</translated>
      <helpLabels>
        <label mode="any">label.relation.search.all_words.info</label>
      </helpLabels>
      <fields>
        <field>rel_srch:ecm_fulltext</field>
      </fields>
      <properties widgetMode="edit">
        <property name="styleClass">dataInputText</property>
      </properties>
    </widget>

    <widget name="relation_search_deleted_documents" type="template">
      <labels>
        <label mode="any">label.relation.deleted.documents</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>rel_srch:currentLifeCycleState</field>
      </fields>
      <properties mode="any">
        <property name="template">
          /widgets/search_deleted_documents_widget.xhtml
        </property>
      </properties>
      <widgetModes>
        <mode value="any">
          #{nxu:test(deleteActions.trashManagementEnabled, 'edit', 'hidden')}
        </mode>
      </widgetModes>
    </widget>

    <widget name="relation_search_path" type="select_path_tree">
      <labels>
        <label mode="any">label.relation.search.path</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>rel_srch:ecm_path</field>
      </fields>
      <properties widgetMode="edit">
        <property name="styleClass">dataInputText</property>
        <property name="labelOpenPopUp">label.relation.addPath</property>
        <property name="showAllDomains">true</property>
      </properties>
    </widget>

    <widget name="relation_listing_title_link" type="relation_listing_title_link">
      <labels>
        <label mode="any">label.content.header.title</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>data</field>
        <field>data.ref</field>
        <field>data.dc.title</field>
        <field>data.file.content</field>
        <field>data.file.filename</field>
      </fields>
      <properties mode="any">
        <property name="file_property_name">file:content</property>
        <property name="file_schema">file</property>
      </properties>
    </widget>

    <widget name="listing_path" type="text">
      <labels>
        <label mode="any">label.relation.search.path</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>data.pathAsString</field>
      </fields>
    </widget>

  </extension>

</component>
